package cn.schoolwow.util.domain.query.dictionary;

import cn.schoolwow.quickflow.QuickFlow;
import cn.schoolwow.quickflow.QuickFlowBuilder;
import cn.schoolwow.util.module.query.dictionary.domain.QueryDictionaryOption;
import cn.schoolwow.util.module.query.dictionary.service.ReplaceToKeyFlow;
import cn.schoolwow.util.module.query.dictionary.service.ReplaceToValueFlow;

public class QueryDictionaryResponse {
    private static QuickFlow quickFlow = QuickFlowBuilder.newInstance();

    public QueryDictionaryResponse(QueryDictionaryOption queryDictionaryOption) {
        quickFlow.putContextThreadLocalInstanceData(queryDictionaryOption);
    }

    /**替换字典为字典key*/
    public QueryDictionaryResponse replaceToDictionaryKey(){
        quickFlow.executeFlow(new ReplaceToKeyFlow());
        return this;
    }

    /**替换字典为字典值*/
    public QueryDictionaryResponse replaceToDictionaryValue(){
        quickFlow.executeFlow(new ReplaceToValueFlow());
        return this;
    }

}
